home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / f90 / pxfchown.z / pxfchown
Text File  |  1998-10-30  |  3KB  |  81 lines

  1. PXFCHOWN(3F)                                           Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      PPXXFFCCHHOOWWNN - Changes the owner and group of a file
  6.  
  7. SSYYNNOOPPSSIISS
  8.      CCHHAARRAACCTTEERR*_n _p_a_t_h
  9.      IINNTTEEGGEERR _i_l_e_n,, _i_o_w_n_e_r,, _i_g_r_o_u_p,, _i_e_r_r_o_r
  10.      CCAALLLL PPXXFFCCHHOOWWNN((_p_a_t_h,, _i_l_e_n,, _i_o_w_n_e_r,, _i_g_r_o_u_p,, _i_e_r_r_o_r))
  11.  
  12. IIMMPPLLEEMMEENNTTAATTIIOONN
  13.      UNICOS, UNICOS/mk, and IRIX systems
  14.  
  15. SSTTAANNDDAARRDDSS
  16.      IEEE standard interface for FORTRAN 77
  17.  
  18. DDEESSCCRRIIPPTTIIOONN
  19.      On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
  20.      default when compiling programs with the MIPSpro 7 Fortran 90 compiler
  21.      or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
  22.      7.2 F77 compiler.
  23.  
  24.      The PPXXFFCCHHOOWWNN subroutine uses the cchhoowwnn(2) function to change the owner
  25.      and group of a file.
  26.  
  27.      The value of _i_o_w_n_e_r and _i_g_r_o_u_p indicates the new values.
  28.  
  29.      When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
  30.      UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
  31.      kind unless documented otherwise.  On UNICOS and UNICOS/mk, default
  32.      kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
  33.      IRIX, the default kind is KKIINNDD==44.
  34.  
  35.      The following is a list of valid arguments for this routine:
  36.  
  37.      _p_a_t_h      Input character variable or array element containing the
  38.                name of a file.
  39.  
  40.      _i_l_e_n      Input integer variable containing the length of _p_a_t_h in
  41.                characters.  If _i_l_e_n is zero, all trailing blanks are
  42.                removed before calling cchhoowwnn().
  43.  
  44.      _i_o_w_n_e_r    Input integer variable containing the integer value for the
  45.                owner.
  46.  
  47.      _i_g_r_o_u_p    Input integer variable containing the integer value for the
  48.                group.
  49.  
  50.      _i_e_r_r_o_r    Output integer variable that contains zero if the group and
  51.                owner of the file were changed or nonzero if PPXXFFCCHHOOWWNN did
  52.                not change the group and owner.
  53.  
  54.      In addition to the errors returned by the cchhoowwnn(2) system call,
  55.      PPXXFFCCHHOOWWNN may return the following errors:
  56.  
  57.      EEIINNVVAALL    If _i_l_e_n is less than 0 or _i_l_e_n is greater than LLEENN((_p_a_t_h)).
  58.  
  59.      EENNOOMMEEMM    If PPXXFFCCHHOOWWNN is unable to obtain memory to copy _p_a_t_h.
  60.  
  61. EEXXAAMMPPLLEESS
  62.           subroutine test (iowner,igroup)
  63.           character*(12) path
  64.           integer ilen, iowner, igroup, ierr
  65.           path = 'testfile'
  66.           ilen = 0
  67.           call pxfchown(path,ilen,iowner,igroup,ierr)
  68.           if (ierr.ne.0) then
  69.               print *,'FAIL: error from pxfchown = ',ierr
  70.           else
  71.               print *,'PASS: No error from pxfchown = '
  72.           endif
  73.           end
  74.  
  75. SSEEEE AALLSSOO
  76.      cchhoowwnn(2)
  77.  
  78.      _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-
  79.      2165, for the printed version of this man page.
  80.  
  81.